<!--
  Generated template for the CollectionPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar color="light">
    <ion-buttons start>
      <button ion-button (click)="dismissCLI()">
          <img src="assets/img/back.png" width='15' height='20'>
        </button>
    </ion-buttons>
    <ion-title *ngIf="!search">我的美图美款</ion-title>
    <ion-buttons end style="text-align: right;" *ngIf="!search">
      <button ion-button (click)="activationCLI()" *ngIf="activation == false">管理</button>
      <button ion-button (click)="activationokCLI()" *ngIf="activation == true">完成</button>
      <button ion-button (click)="searchby()">
          <ion-icon name="ios-search-outline"></ion-icon>
      </button>
      <button ion-button (tap)="gotoPic()">
        <img src="assets/img/Comment/add.png" alt="" class="goPic">
      </button>
    </ion-buttons>
    <ion-buttons style="text-align: right;" *ngIf="search">
      <ion-searchbar [(ngModel)]="content" (ionChange)="searchAPI()" (ionBlur)="back()"></ion-searchbar>
      <button ion-button (tap)="sousuo()">搜索</button>
    </ion-buttons>
  </ion-navbar>
</ion-header>


<ion-content padding>
<div *ngIf="haveData" class="contentWrap">
  <ion-grid>

    <!-- 有内容 -->
    <!-- <div *ngFor="let item of myPiclist,let i=index"> -->
    <!-- <div class="timesacep">{{item.time}}</div> -->
    <ion-row>
      <ion-col col-4 class="mycollpid" *ngFor="let listitem of myPiclist;let j=index">
        <!-- <div class="timesacep">{{listitem.nail_addtime}}</div> -->
        <div class="mypicture">
          <div class="shenheWrap" *ngIf="listitem.pass_flag == 0 || listitem.pass_flag == -1" (click)="activation?selectCLI(j):null">
            <span class="span1" *ngIf="listitem.pass_flag == 0">审核中</span>
            <span class="span2" *ngIf="listitem.pass_flag == -1">审核未通过 </span>
            <div class="noPassing" *ngIf="listitem.pass_flag == -1  && passFlag == true">
              <span class="passEdit">编辑</span>
              <span class="passDelet" (tap)="deletOne(j)">删除</span>
            </div>
          </div>
          <div class="solding" *ngIf="listitem.sold_in == 1">
            <img src="assets/img/Comment/shouchuzhong@2x.png" alt="">
          </div>
          <img src="{{picrooturl}}{{listitem.nail_small_url}}" width="100%" height="80%" alt="图片内容" (click)="activation?selectCLI(j):gotoNail(listitem)" class="goodsPic">
          <img src="{{listitem.selectimg}}" class="imgcoll" alt="删除" *ngIf="activation == true" (click)="selectCLI(j)">
          <!-- <img src="assets/img/more.png" class="imgmore" alt="更多" (click)="moreCLI(i,j)" *ngIf="activation == false"> -->
          <!-- <img src="assets/img/goumai.png" class="goumai" alt="已购买" *ngIf="collectionlist[i]['data'][j]['is_buy'] == 1"> -->
        </div>
        <span class="collection">{{listitem.nail_name}}</span>
      </ion-col>
    </ion-row>
    <!-- </div> -->
  </ion-grid>
  <div *ngIf="bottom1" class="bot">已经加载全部啦 ~</div>
  <ion-infinite-scroll (ionInfinite)="doInfinite($event)">
    <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
  </ion-infinite-scroll>
  <ion-footer *ngIf="activation==true">
    <div class="footer-bar">
      <div class="footer-bar-left" (click)="activation?selectall():null">
              <span *ngIf="selectallflag == false"><img src="assets/img/selectno1.png" class="selectall" /> 全选</span>
              <span *ngIf="selectallflag == true"><img src="assets/img/selectok.png" class="selectall" /> 取消全选</span>
      </div>
      <div class="footer-bar-right" (click)="delallNailAPI()">删除</div>
    </div>
  </ion-footer>
</div>
<div class="no" *ngIf="!haveData">
  <div>您还没上传款式图片哟</div>
</div>
</ion-content>